package com.itheima.web.controller;

import com.itheima.service.mongo.MovementService;
import com.itheima.web.manager.MovementManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MovementController {

    @Autowired
    private MovementManager movementManager;

    /**
     * 动态复审-通过
     */
    @PostMapping("/manage/messages/pass")
    public ResponseEntity pass(@RequestBody String[] movementIdList){
        return movementManager.pass(movementIdList);
    }

    /**
     * 动态复审-驳回
     */
    @PostMapping("/manage/messages/reject")
    public ResponseEntity reject(@RequestBody String[] movementIdList){
        return movementManager.reject(movementIdList);
    }
}
